<template>
  <a-select
    v-model:value="val"
    style="width: 120px"
    ref="select"
    @change="change"
  >
    <a-select-option value="jack">Jack</a-select-option>
    <a-select-option value="lucy">Lucy</a-select-option>
    <a-select-option value="disabled" disabled>Disabled</a-select-option>
    <a-select-option value="Yiminghe">yiminghe</a-select-option>
  </a-select>
</template>

<script>
import { ref } from "@vue/reactivity";
export default {
    props:{
        currentVal:{
            type:String,
            required:true
        },
        options:{
            type:Array,
            required:true
        }
    },
  setup(props) {
    const val = ref(props.currentVal);

    const change = (value) => {
      console.log(`selected ${value}`);
    };
    return {
      val,
      change,
    };
  },
};
</script>

<style>
</style>